class Message {
    handler(messageType, data, callback = () => {}){
        switch (messageType) {
            case 'onlyMsg':
                showNotify(data.msg, data.msgType);
                break;
            default:
                break;
        }
        callback();
    }
}

const messageSingleton = (function() {
    let instance;

    function createInstance() {
        return new Message();
    }

    return {
        getInstance: function() {
            if (!instance) {
                instance = createInstance();
            }
            return instance;
        }
    };
})();
